package com.example.zhunongzonghe.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.zhunongzonghe.beans.ZnExchangePostBean;
import com.example.zhunongzonghe.entity.ZnExchangePost;


public interface IZnExchangePostService extends IService<ZnExchangePost> {

    /**
     * 后台查询全部帖子信息
     * @param currentPage
     * @param pageNum
     * @return
     */
    Page<ZnExchangePostBean> searchPostAll(Integer currentPage,Integer pageNum);

    /**
     * 前台显示全部已审核帖子
     * @param currentPage
     * @param pageNum
     * @return
     */
    Page<ZnExchangePostBean> postAll(Integer currentPage,Integer pageNum);
    /**
     * 用户登录后查看全部帖子信息，以及是否被自己点赞
     * @param currentPage
     * @param pageNum
     * @return
     */
    Page<ZnExchangePostBean> LogUserPostAll(Integer currentPage,Integer pageNum,String userName);

    /**
     * 分页搜索
     * @param searchTitle
     * @param currentPage
     * @param pageNum
     * @return
     */
    Page<ZnExchangePostBean> searchPostsTitle(Object searchTitle,Integer currentPage,Integer pageNum);

    /**
     * 当前登录用户查看自己发布的帖子
     * @param currentPage
     * @param pageSize
     * @param userName
     * @return
     */
    Page<ZnExchangePostBean> searchMyPost(Integer currentPage,Integer pageSize,String userName);

    void delMyPost(Integer postId,String userName);
}
